const mongoose = require('mongoose');

// 定义图片Schema
const imageSchema = new mongoose.Schema({
  name: {
    type: String,
    required: true
  },
  url: {
    type: String,
    required: true
  },
  description: {
    type: String,
    default: ''
  },
  createdAt: {
    type: Date,
    default: Date.now
  }
});

// 创建并导出Image模型
module.exports = mongoose.model('Image', imageSchema); 